https://github.com/ephraimduncan/disposable-email-api
This API allows you to check if an email address is from a disposable email service.
https://github.com/ephraimduncan/disposable-email-api
api disposable-email disposable-email-domains disposable-emails hono
Last synced: about 1 year ago
JSON representation
This API allows you to check if an email address is from a disposable email service.
- Host: GitHub
- URL: https://github.com/ephraimduncan/disposable-email-api
- Owner: ephraimduncan
- License: mit
- Created: 2023-12-08T21:05:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T19:41:08.000Z (over 2 years ago)
- Last Synced: 2025-04-01T06:27:32.879Z (over 1 year ago)
- Topics: api, disposable-email, disposable-email-domains, disposable-emails, hono
- Language: TypeScript
- Homepage: https://is-disposable-email.ephraimduncan68.workers.dev/
- Size: 27.3 KB
- Stars: 17
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
## Is-Disposable-Email API
This API allows you to check if an email address is from a disposable email service.
> https://is-disposable-email.ephraimduncan68.workers.dev/
### Development
#### Clone the repository
```
git clone https://github.com/dephraiim/disposable-email-api.git
cd disposable-email-api
pnpm install
pnpm run dev
```
#### Deploy to Cloudflare Workers
```
pnpm run deploy
```
### Usage
#### Endpoints
```
GET /
POST /
```
#### GET /
This endpoint returns information about the API.
**Response:**
```json
{
"name": "is-disposable-email",
"version": "1.0.0"
}
```
#### POST /
This endpoint checks if an email address is disposable.
**Request Body:**
```json
{
"email": "your_email_address@example.com"
}
```
**Response:**
```json
{
"email": "your_email_address@example.com",
"isDisposable": true|false,
"isAllowedList": true|false,
"status": "success",
"message": "Email is from a disposable email service",
"timestamp": "2023-12-08T20:42:00.000Z"
}
```
**Response Codes:**
- 200: The request was successful.
- 400: The request was invalid.
- 500: An internal server error occurred.
### Example Usage
```bash
curl -X POST -H "Content-Type: application/json" -d '{"email": "test@example.com"}' https://is-disposable-email.ephraimduncan68.workers.dev/
```