Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 days 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 (11 months ago)
- Default Branch: main
- Last Pushed: 2023-12-15T19:41:08.000Z (11 months ago)
- Last Synced: 2024-11-02T14:34:01.508Z (11 days 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: 16
- 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": "[email protected]"
}
```**Response:**
```json
{
"email": "[email protected]",
"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": "[email protected]"}' https://is-disposable-email.ephraimduncan68.workers.dev/
```